package com.qyer.lxp.model.book.normal;

import com.qyer.lxp.model.availability.normal.UnitPrice;

import javax.xml.bind.annotation.*;
import java.io.Serializable;
import java.util.List;

/**
 * Created by jiangping on 16/7/1.
 */
@XmlRootElement(name = "book-item-response")
@XmlAccessorType(XmlAccessType.FIELD)
public class BookItemResponse implements Serializable{
    private static final long serialVersionUID = 5201824920621328866L;

    /**
     * 分销商的订项 refer
     */
    @XmlElement(name = "distributor-order-item-refer")
    private String distributorOrderItemRefer;

    /**
     * 订项 cd
     */
    @XmlElement(name = "order-item-cd")
    private String orderItemCd;

    /**
     * 状态
     */
    private String status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 总净价
     */
    @XmlElement(name = "total-net-price")
    private double totalNetPrice;

    /**
     * 是否可退
     */
    private boolean cancellable;

    /**
     * 退条款
     */
    private String cancellation;

    /**
     * 退提前申请小时
     */
    @XmlElement(name = "cancel-hours")
    private int cancelHours;

    /**
     * 是否必须整单全退
     */
    @XmlElement(name = "cancel-all")
    private boolean cancelAll;

    @XmlElementWrapper(name = "prices")
    @XmlElement(name = "unit-price")
    private List<UnitPrice> unitPrice;

    public String getDistributorOrderItemRefer() {
        return distributorOrderItemRefer;
    }

    public void setDistributorOrderItemRefer(String distributorOrderItemRefer) {
        this.distributorOrderItemRefer = distributorOrderItemRefer;
    }

    public String getOrderItemCd() {
        return orderItemCd;
    }

    public void setOrderItemCd(String orderItemCd) {
        this.orderItemCd = orderItemCd;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public double getTotalNetPrice() {
        return totalNetPrice;
    }

    public void setTotalNetPrice(double totalNetPrice) {
        this.totalNetPrice = totalNetPrice;
    }

    public boolean isCancellable() {
        return cancellable;
    }

    public void setCancellable(boolean cancellable) {
        this.cancellable = cancellable;
    }

    public String getCancellation() {
        return cancellation;
    }

    public void setCancellation(String cancellation) {
        this.cancellation = cancellation;
    }

    public int getCancelHours() {
        return cancelHours;
    }

    public void setCancelHours(int cancelHours) {
        this.cancelHours = cancelHours;
    }

    public boolean isCancelAll() {
        return cancelAll;
    }

    public void setCancelAll(boolean cancelAll) {
        this.cancelAll = cancelAll;
    }

    public List<UnitPrice> getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(List<UnitPrice> unitPrice) {
        this.unitPrice = unitPrice;
    }

    @Override
    public String toString() {
        return "BookItemResponse{" +
                "distributorOrderItemRefer='" + distributorOrderItemRefer + '\'' +
                ", orderItemCd='" + orderItemCd + '\'' +
                ", status='" + status + '\'' +
                ", remark='" + remark + '\'' +
                ", totalNetPrice=" + totalNetPrice +
                ", cancellable=" + cancellable +
                ", cancellation='" + cancellation + '\'' +
                ", cancelHours=" + cancelHours +
                ", cancelAll=" + cancelAll +
                ", unitPrice=" + unitPrice +
                '}';
    }
}
